#define M 14
#include<stdio.h>
void  fun(char(*t)[M], int* a, int* c)
{
	*a = 0;
	*c = 0;
	for (int i = 0; i < M; i++)
	{
		for (int j = 0; j < M; j++)
		{
			if (t[i][j] == 'A')
			{
				*a = *a+1;
			}
			if (t[i][j] == 'B')
			{
				*c= *c + 1;
			}

		}
	}
}
int main()
{
	char  a[M][M] = {"AAABBBCCC"};
	int x = 0;
	int y = 0;
	fun(a, &x, &y);
	printf("A = %d   C = %d\n", x, y);
}